package com.ang.async.test01;

import com.ang.DemoApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author ssang
 * @date 2022-07-19 12:14
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = DemoApplication.class)
public class Test1 {
    @Autowired
    TaskUtil taskUtil;

    @Test
    public void test() throws Exception{
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("test1:"+sdf.format(new Date()));
        taskUtil.tesk01(sdf.format(new Date()));

//        Thread.sleep(2000);
        System.out.println("test2:"+sdf.format(new Date()));
    }
}
